package com.health.platform.provider.homepage.controller;

import com.health.platform.common.core.entity.BaseQueryEntity;
import com.health.platform.common.restful.AppResponse;
import com.health.platform.provider.homepage.service.HomePageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>首页Controller</p>
 * <p>创建日期：2021-02-24</p>
 *
 * @author zhou-qf
 */
@RestController
@RequestMapping("homePage")
public class HomePageController {

    @Autowired
    private HomePageService homePageService;

    /**
     * 获取中间部分汇总信息
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getSummaryInfo")
    public AppResponse getSummaryInfo(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getSummaryInfo(baseQueryEntity);
    }

    /**
     * 获取人群状况
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getCrowdStatus")
    public AppResponse getCrowdStatus(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getCrowdStatus(baseQueryEntity);
    }

    /**
     * 获取均次费用、门诊抗菌药使用率、药占比
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getTrendInfo")
    public AppResponse getTrendInfo(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getTrendInfo(baseQueryEntity);
    }
    /**
     * 获取床位使用率，重症床位使用率，手术例数，死亡人数
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getHospitalTrendInfo")
    public AppResponse getHospitalTrendInfo(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getHospitalTrendInfo(baseQueryEntity);
    }

    /**
     * 获取公共服务
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getPublicService")
    public AppResponse getPublicService(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getPublicService(baseQueryEntity);
    }

    /**
     * 获取中医服务
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getChMedicine")
    public AppResponse getChMedicine(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getChMedicine(baseQueryEntity);
    }

    /**
     * 获取昨日发热人次、肠道门诊人次
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getLastDayDis")
    public AppResponse getLastDayDis(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getLastDayDis(baseQueryEntity);
    }

    /**
     * 获取卫生资源
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getHealthRes")
    public AppResponse getHealthRes(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getHealthRes(baseQueryEntity);
    }

    /**
     * 获取医疗服务
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getMedical")
    public AppResponse getMedical(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getMedical(baseQueryEntity);
    }

    /**
     * 获取昨日省内门诊就诊流向
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getOutpatientFlow")
    public AppResponse getOutpatientFlow(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getOutpatientFlow(baseQueryEntity);
    }

    /**
     * 获取半年内住院就诊流向
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getInHospitalFlow")
    public AppResponse getInHospitalFlow(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getInHospitalFlow(baseQueryEntity);
    }


    /**
     * 获取外来就诊流向
     * @param baseQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getForeignFlow")
    public AppResponse getForeignFlow(@RequestBody BaseQueryEntity baseQueryEntity){
        return homePageService.getForeignFlow(baseQueryEntity);
    }
}
